package com.xn.monitor.web.entity;

import org.springframework.web.socket.WebSocketSession;

/**
 * Created by yangshoujun on 2017/7/24 下午9:17.
 */
public class SessionHolder {

    private WebSocketSession session;
    private long lastAccessTime;

    public WebSocketSession getSession() {
        return session;
    }

    public long getLastAccessTime() {
        return lastAccessTime;
    }

    public void setSession(WebSocketSession session) {
        this.session = session;
    }

    public void setLastAccessTime(long lastAccessTime) {
        this.lastAccessTime = lastAccessTime;
    }

    public void access() {
        lastAccessTime = System.currentTimeMillis();
    }
}
